<?php

class Home2 extends CI_Controller {

    var $_public_view;

    function __construct() {
        parent::__construct();
        $this->load->model('model_listing', 'mlisting');
        $this->load->helper('url');
        $this->load->library('session');
        $this->config->load('artyproperty');
        $this->_public_view = $this->config->item('public_view');
    }

    function index() {
        //ini hanya untuk sementara
        $this->session->set_userdata('isLogin', true);
        $this->session->set_userdata('username', 'faiq');
        $this->session->set_userdata('level', 1);
        $this->session->set_userdata('user_id', 1);
        //
        //
        //cek session
        $islogin = $this->session->userdata('isLogin');
        $user = '';
        if ($islogin) {
            $user = $this->session->userdata('username');
        }

        $data = array('page_title' => 'Artyrpoperty',
            'page_content' => 'home', 'isLogin' => $islogin,
            'user' => $user);
		$this->load->view('header',$data);
        $this->load->view('home_',$data);
		$this->load->view('footer');
    }

}

?>
